package edu.ybu.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.ybu.manage.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper extends BaseMapper<Product> {
    @Select("select * from product_info limit #{begin},#{size}")
    List<Product> selectAllProductByPage(@Param("begin") Integer begin, @Param("size") Integer size);
    @Select("select count(*) from product_info")
    Integer getProductCount();
    @Select("select * from product_info where product_name like concat('%',#{productname},'%') limit #{begin},#{size}")
    List<Product> searchTeachersByPage(@Param("begin") Integer begin, @Param("size") Integer size, String productname);
}